#include<iostream>
using namespace std;

int main()
{
    const int a = 10;
    // int *p1 = &a;会出现问题 通过指针修改a的值 *p=30;int* <- const int*
    int *p1 = (int *)&a; //通过类型转化，将const int*转化为int*
    *p1 = 30;
    cout << a << "," << *p1 << "," << *(&a) << endl; //10,30,30

    const int *p2 = &a; // 不能通过指针修改其对应的值 *p2=20;
    

    return 0;
}